﻿#include "GUIJunctionDialogBase.h"

namespace GUI
{
    GUIJunctionDialogBase::GUIJunctionDialogBase(int dataID, EventOper::ParaWidgetInterfaceOperator * oper, bool isCreate, QWidget * parent) :
        GUIDialogBase(parent), _currentDataID(dataID), _oper(oper), _isCreate(isCreate)
    {

    }

    void GUIJunctionDialogBase::accept()
    {
        disHight();
        GUIDialogBase::accept();
    }

    void GUIJunctionDialogBase::reject()
    {
        disHight();
        GUIDialogBase::reject();
    }

    void GUIJunctionDialogBase::showEvent(QShowEvent * event)
    {
        if (_currentDataID != -1 && _isCreate != true) {
            hightGraphObj(_currentDataID);
        }
    }

    void GUIJunctionDialogBase::disHight()
    {
        if (_currentDataID != -1 && _isCreate != true) {
            disHightGraphObj(_currentDataID);
        }
    }
}